#include "loginUser.h"

LoginUser::LoginUser(QObject *parent) : QObject(parent)
{
    clear();
}

QString LoginUser::getName() const
{
    return name;
}

void LoginUser::setName(const QString &value)
{
    name = value;
}

QString LoginUser::getPasswd() const
{
    return passwd;
}

void LoginUser::setPasswd(const QString &value)
{
    passwd = value;
}

qint32 LoginUser::getLevel() const
{
    return level;
}

void LoginUser::setLevel(const qint32 &value)
{
    level = value;
}

void LoginUser::clear()
{
    name.clear();
    passwd.clear();
    level = -1;
    isUpdate = false;
}

bool LoginUser::checkEmpty()
{
    return (name.isEmpty() || passwd.isEmpty());
}

bool LoginUser::getIsUpdate() const
{
    return isUpdate;
}

void LoginUser::setIsUpdate(bool value)
{
    isUpdate = value;
}
